<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.eos.freeect.common.model.Announcement" %>
<%@ page import="java.util.List"%>
<%@ page import="com.eos.freeect.common.Utilities"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--自动刷新-->
<meta http-equiv="Refresh" content="120; url=common/right-bar.eos">
<html>
<head>
  <s:include value="/common/base.jsp"/>
  <base href="<%=request.getAttribute("basepath")%>"/>

  <link rel="stylesheet" type="text/css" href="template/content.css">
  <link rel="stylesheet" type="text/css" href="template/layout.css">
</head>


<script language="JavaScript">
<!--
function key(){

}
document.onkeydown=key;
if (window.Event)
document.captureEvents(Event.MOUSEUP);
//swordmaple javascript article.
//from www.jx165.com
function nocontextmenu(){
event.cancelBubble = true
event.returnValue = false;
return false;}
function norightclick(e){
if (window.Event){
if (e.which == 2 || e.which == 3)
return false;}
else
if (event.button == 2 || event.button == 3){
event.cancelBubble = true
event.returnValue = false;
return false;}
}
//禁止右键
document.oncontextmenu = nocontextmenu;  // for IE5+
document.onmousedown = norightclick;  // for all others
//-->
</script>


<body leftMargin="0" topMargin="0" marginwidth="0" marginheight="0"  onselectstart="return false;" onpaste="return false;">
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="10%" valign="top"><img src="images/template/default/toolbar-top-left.jpg"></td>
      <td width="70%" background="images/template/default/toolbar-top-middle.jpg"></td>
	  <td width="20%" valign="top" width="100%">
	  <table border="0" cellpadding="0" cellspacing="0" >
		<tr>
			<td>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td valign="top"><img src="images/template/default/toolbar-top-right.jpg"></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="5%"><img src="images/template/default/toolbar-top-line-left.jpg"></td>
						<td align="right" width="55%" background="images/template/default/toolbar-top-line-right.jpg" nowrap>

						</td>
						<td align="left" width="20%" background="images/template/default/toolbar-top-line-right.jpg" nowrap>
							<a href="common/welcome.eos" class="toolbar-menu" target="fraContent">主页</a>
						</td>
						<td align="left" width="20%" background="images/template/default/toolbar-top-line-right.jpg" nowrap>
							<a href="common/logout.eos" class="toolbar-menu">注销</a>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		</table>
	  </td>
    </tr>
  </table>

  <table width="100%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
      <td width="10%"><img src="images/template/default/toolbar-bottom-left.jpg"></td>
      <td width="90%" align="right" valign="top" style="padding-top:3;padding-right:10;" background="images/template/default/toolbar-bottom-right.jpg">
		<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr>
				<td width="5%">
					<a href="common/view-announcement-list.eos"  target="fraContent" class="action-button"><img src="images/template/default/button-message.jpg" border="0" alt="公告"></a>
				</td>
				<td width="95%" valign="middle"><nobr><marquee scrollamount='2' scrolldelay='10' direction= 'left' width='100%' id='helpor_net' onmouseover='helpor_net.stop()' onmouseout='helpor_net.start()'>



<%

List marquee  = (List)Utilities.getAttribute("com.eos.freeect.common.announcement.marquee");
String til = null;
String id = null;
String color = "#D8D8D8";


if(marquee == null || marquee.size() == 0)
{
    out.print("<font color='" + color+ "' face='黑体' font size='2'>欢迎使用EOS开源的FreeECT系统</font>");
}
else
{

    for (int i=0; i<marquee.size(); i++) {
          Announcement myform= (Announcement)marquee.get(i);
          if(myform.getAnnoId() == null){
          	id = "";
          }else{
          	id=myform.getAnnoId();
          }
          if(myform.getAnnoTitle() == null){
          	til ="";
          }else{

          til =myform.getAnnoTitle();
          til = til.replaceAll("<", "&lt;");
          til = til.replaceAll(">", "&gt;");
          til = til.replaceAll("\\r\\n","<br/>");
          til = til.replaceAll(" ", "&nbsp;");

          }
          out.print("<A href='' onclick=\"display('" + id + "')\" ><font color='" + color+ "' face='黑体' font size='2'>"+til+"</font></A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
    }

}

%>

				</marquee></nobr></td>

				</td>
			</tr>
		</table>
      </td>
    </tr>
  </table>
</body>



<script LANGUAGE="JavaScript">

<!--
function display(id)
{
     event.returnValue = false;
     var param = "infoId=" + id;
     var ww = 600;
     var hh = 300;
     var left = (window.screen.width - ww ) / 2;
     var top = (window.screen.height - hh ) / 2;

     var win = window.open("../../advisor/informationissue/information-display.jspx?"+ param,
                           "_blank",
                           "left="+left+",top="+top+",resizable=yes,scrollbars=yes,width="+ww+",height="+hh);
}

//-->
</script>
</html>
